//
//  SegmentedViewController.swift
//  cabbage_swift
//
//  Created by dfsx6 on 2022/1/14.
//

import UIKit
import JXSegmentedView

class SegmentedViewController: UIViewController {

    fileprivate let mySegmentedView = JXSegmentedView.init()
    fileprivate let mySegmentedViewH: CGFloat = 50
    fileprivate let myDataSource = JXSegmentedTitleDataSource.init()
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.view.backgroundColor = .white
        
        myDataSource.titles = ["首页", "瀑布流", "命名空间"]
        mySegmentedView.dataSource = myDataSource
        view.addSubview(mySegmentedView)
    }

    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        
        mySegmentedView.frame = CGRect.init(x: 0, y: 84, width: view.bounds.width, height: mySegmentedViewH)
    }
}
